<template>
	<div style="max-height: 150px;overflow: auto;display: contents;">
		<div v-for="item in this.userList" :key="item.accountId" style="display: inline-block;">
			<el-tag style="margin-right: 10px;">{{ item.userName }}
			</el-tag>
		</div>
	</div>
</template>
<script>
export default {
	props: {
		accountIds:String
	},
	data() {
		return {
			userList:[]
		}
	},
	watch: {
		'accountIds': {
			handler(val) {
				this.initSelectDialog();
			}
		},
	},
	mounted() {
		this.initSelectDialog();
	},
	methods:{
		async initSelectDialog()
		{
			if(this.accountIds!="")
			{
				var res = await this.$API.system.user.getUserListByAccountIds.get({accountIds: this.accountIds});
				if (res.code == 200) {
					this.userList = res.data;
				}else
				{
					this.$alert(res.message, "提示", {type: 'error'})
				}
			}
		},
	}
}
</script>
